package work.parabola.keyboardswitch.util;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;

public class DateTimeUtil {

    public final static String CH_MONTH_FORMAT = "yyyy年MM月dd日";

    public final static String FULL_FORMAT = "yyyy-MM-dd HH:mm:ss";

    public static String dateToStr(Date date, String formatStr) {
        SimpleDateFormat formatter = new SimpleDateFormat(formatStr);
        formatter.setTimeZone(TimeZone.getTimeZone("UTC"));
        return formatter.format(date);
    }
}
